﻿<UserControl x:Class="AtletIS.Shared.WpfControls.ChipViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="800" Loaded="UserControl_Loaded" xmlns:my="clr-namespace:AtletIS.Shared.WpfControls">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="590"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="80" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <my:HeaderBox
            Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" 
            x:Name="cbTitle" />

        <DataGrid
            Grid.Column="1" Grid.Row="2" Margin="5"
            FontSize="16" Height="460" 
            BorderThickness="1" BorderBrush="SteelBlue"
            AutoGenerateColumns="False" Foreground="SteelBlue"
            VerticalAlignment="Top"
            Name="dgCheckPoints" 
            AlternatingRowBackground="Gainsboro" 
            CanUserResizeRows="False" CanUserResizeColumns="False" CanUserReorderColumns="False" 
            CanUserSortColumns="False" HorizontalGridLinesBrush="Gainsboro" VerticalGridLinesBrush="Gainsboro" RowHeaderWidth="0" CanUserDeleteRows="True" CanUserAddRows="False" SelectionMode="Single" SelectionChanged="dgCheckPoints_SelectionChanged" Focusable="False" IsReadOnly="True">

            <DataGrid.Columns>
                <DataGridTextColumn Header="Check-points" Binding="{Binding Path=Name}" Width="*" />
            </DataGrid.Columns>

            <DataGrid.CellStyle>
                <Style TargetType="DataGridCell">
                    <Setter Property="Padding" Value="10,15"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type DataGridCell}">
                                <Border Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <Trigger Property="IsSelected"
                        Value="True">
                            <Setter Property="BorderThickness" Value="0" />
                            <Setter Property="Background" Value="LightSteelBlue" />
                            <Setter Property="Foreground" Value="SteelBlue" />
                            <Setter Property="FontWeight" Value="Bold" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </DataGrid.CellStyle>

        </DataGrid>
        
        <StackPanel
            Grid.Column="2"
            Grid.Row="2">

            <ItemsControl
                Width="590"
                Margin="0,10,0,0"
                MinHeight="10"
                BorderBrush="SteelBlue"
                BorderThickness="0"
                HorizontalAlignment="Left"
                ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                Name="lbTopThree">

                <ItemsControl.Background>
                    <SolidColorBrush />
                    </ItemsControl.Background>

            </ItemsControl>

            <Label
                Content="Actual" FontSize="16" Foreground="SteelBlue"/>

            <ItemsControl
                Width="590"
                MinHeight="50"
                BorderBrush="SteelBlue"
                BorderThickness="0"
                HorizontalAlignment="Left"
                ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                Name="lbNext">

                <ItemsControl.Background>
                    <SolidColorBrush />
                </ItemsControl.Background>

            </ItemsControl>

        </StackPanel>
        
    </Grid>
    
</UserControl>
